<extend name="Index:base" />
<block name="title"><title>订单详情</title></block>
<block name="style">
 <style>
.main,.panel-default>.panel-heading{
background:none;
}
body{
background:none;
}
.panel.panel-default,.panel .panel-body,.panel .panel-heading,.table-bordered {
	border:none;
}
.table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
	border:none;		
	padding:15px 0 15px 0;	
	line-height:8px;
	height: 8px;
	border-top: 1px solid #d4d4d4;
	border-bottom: 1px solid #d4d4d4;
}
.name strong{
color:#000000;
font-size:15px;
font-weight:600;
}
.name {
	color:#20a8d8;
	font-size:12px;
}
.smallfont {
	color:#9c9c9c;
	font-size:12px;
}

.align-center{
	text-align:center; 
}
.title2{
text-align:center;
}
.table-bordered > tbody > tr .wd{
	text-align:left;	
}

.col-xs-2,.col-xs-4{
padding-right:0;
margin:10px 0;
}
.col-sm-3{
width:10%;
}
.col-sm-2{
width:8%;
}
.col-sm-1{
width:5%;
}
.col-sm-4{
width:18%;
}
.col-sm-1,.col-sm-2{
margin:16px 0;
}
.col-sm-3,.col-sm-4{
margin:10px 0;
}
.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4{
padding-right:0;
}
 </style>
 
    <link type="text/css" href="__PUBLIC__/Home/css/jquery-ui-1.8.17.custom.css" rel="stylesheet" />
     <link type="text/css" href="__PUBLIC__/Home/css/jquery-ui-timepicker-addon.css" rel="stylesheet" />
	 
</block>
	<!-- start: Header -->
<block name="body">

			<!-- end: Main Menu -->
						
		<!-- start: Content -->
		<div class="main ">
		

			<div class="row">		
				<div class="col-lg-12">
					<div class="panel panel-default">
						<div class="panel-heading">
							<h2><span class="break"></span><strong>订单详情</strong></h2>
												
						</div>&nbsp;&nbsp;&nbsp;
	
					<div class="panel-body">
						<table class="table table-striped table-responsive">
							<thead>
								<tr>
									<th></th>
									<th>商品信息</th>
									<th>单价</th>
									<th>实际支付额</th>
									<th>数量</th>
<!-- 									<th class="right">佣金比例</th>
									<th class="right">收取佣金</th> -->                                          
								</tr>
							</thead>   
							<tbody>
								<foreach name="order.goods_list" item="vo">
								<tr>
									<td>
										<a href="/shop/goods.html?gid={$vo.goods_id}" target="_blank">
												<img alt="" src="{$vo.goods_image}" width="60px" height="60px">
										 </a>								
									</td>
									<td class="left">
										<a href="/shop/goods.html?gid={$vo.goods_id}" target="_blank">
										{$vo.goods_name}
										</a>
									</td>
									<td class="left" style="color:red;">
									<if condition="$vo.goods_pay_price gt 0">
									￥{$vo.goods_pay_price}
									</if>
									<if condition="$vo.point_num gt 0">
									<if condition="$vo.goods_pay_price gt 0">
									+
									</if>
									{$vo.point_num}&nbsp;积分
									</if>
									<if condition="$vo.coin_num gt 0">
									{$vo.coin_num}&nbsp;币
									</if>									

									</td>
									<td class="left" style="color:red;">
									<if condition="$vo.goods_pay_price gt 0">
									￥{$vo[goods_pay_price]*$vo[goods_num]}
									</if>
									<if condition="$vo.point_num gt 0">
									<if condition="$vo.goods_pay_price gt 0">
									+
									</if>
									{$vo[point_num]*$vo[goods_num]}&nbsp;积分
									</if>
									<if condition="$vo.coin_num gt 0">
									{$vo[coin_num]*$vo[goods_num]}&nbsp;币
									</if>										
									
									</td>
									<td class="left">{$vo.goods_num}</td>
									
									                                   
								</tr>
								</foreach>
							</tbody>
						</table>

						<div class="row">					

							<div class="col-lg-12 col-lg-offset-4 col-sm-12 col-sm-offset-2 recap pull-right">
								<table class="table  table-responsive" >
									<tbody>
										<tr>
											<td style="border-top: none;"><strong>订单信息</strong></td> 
											<td style="border-top: none;">&nbsp;</td>											
										</tr>
										<tr>
											<td class="">订单号:{$order.order_sn}</td>  
											<td class="">订单状态:
											<if condition="$order.order_state eq '0'">
											取消
											</if>
											<if condition="$order.order_state eq '10'">
											待付款
											</if>
											<if condition="$order.order_state eq '20'">
											已付款
											</if>
											<if condition="$order.order_state eq '30'">
											已发货
											</if>
											<if condition="$order.order_state eq '40'">
											已收货
											</if>
											</td>
										</tr>
										<tr>
											<td style="border-top: none;">订单总额:<font style="color:red;">&nbsp;
											<if condition="$order.order_amount gt 0">
											￥{$order.order_amount}
											</if>
											<if condition="$order.points_amount gt 0">
											<if condition="$order.order_amount gt 0">
											+
											</if>
											{$order.points_amount}&nbsp;积分
											</if>
											<if condition="$order.gold_amount gt 0">
											{$order.gold_amount}&nbsp;币
											</if>
											</font></td>  
											<td style="border-top: none;">运费:&nbsp;￥{$order.shipping_fee}</td>                                           
										</tr >
										<tr>
											<td class="">买家:&nbsp;{$order.buyer_name}</td>  
											<td class="">店铺:&nbsp;{$order.store_name}</td>                                           
										</tr>
										<tr>
											<td style="border-top: none;">支付方式:&nbsp;
											{$order.pay_name}
											
											</td>  
											<td style="border-top: none;">下单时间:&nbsp;{$order.add_time|=date('Y-m-d H:i:s',###)}</td>                                           
										</tr>
										<tr>
											<td style="border-top: none;border-bottom:1px solid #d4d4d4;">支付时间:&nbsp;
											<if condition="$order.payment_time gt 0">
											{$order.payment_time|=date('Y-m-d H:i:s',###)}
											</if>
											
											</td>  
											<td style="border-top: none;border-bottom:1px solid #d4d4d4;">&nbsp;</td>                                           
										</tr>
										<tr>
											<td class="left" style="border-top: none;">&nbsp;</td>											
										</tr>										
										<tr>
											<td class="left" style="border-top: none;"><strong>收货人信息</strong></td>											
										</tr>
										<tr>
											<td class="">收货人姓名:&nbsp;{$order.realname}</td>  
											<td class="">电话号码:&nbsp;{$order.tel_phone}&nbsp;{$order.mob_phone}</td>                                           
										</tr>
										<tr>
											<td style="border-top: none;border-bottom:1px solid #d4d4d4;">详细地址:&nbsp;{$order.province}&nbsp;{$order.city}&nbsp;{$order.area}&nbsp;{$order.address}</td>  
											<td style="border-top: none;border-bottom:1px solid #d4d4d4;">&nbsp;</td>                                           
										</tr>  
										<tr>
											<td class="left" style="border-top: none;">&nbsp;</td>	<td style="border-top: none;">&nbsp;</td>										
										</tr>											
									</tbody>
								</table>
								<a href="" class="btn btn-info" onclick="javascript :history.back(-1)">返回</a>
								<a href="" class="btn btn-success" onclick="javascript:window.print();">打印</a>
								
							</div><!--/col-->

						</div><!--/row-->
					</div>

				
				
					</div>
				</div><!--/col-->
			
			</div><!--/row-->				
			
		<!-- end: Content -->
		<br><br><br>
		
	</div><!--/container-->
		
</block>
<block name="script">
	<script type="text/javascript" src="__PUBLIC__/Home/js/jquery-1.7.1.min.js"></script>	
	<script type="text/javascript" src="__PUBLIC__/Home/js/jquery-ui-1.8.17.custom.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/Home/js/jquery-ui-timepicker-addon.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Home/js/jquery-ui-timepicker-zh-CN.js"></script>
<script>
    $(function () {
        $(".ui_timepicker2").datetimepicker({
            //showOn: "button",
            //buttonImage: "./css/images/icon_calendar.gif",
            //buttonImageOnly: true,
            showSecond: true,
            timeFormat: 'hh:mm:ss',
            stepHour: 1,
            stepMinute: 1,
            stepSecond: 1
        });
		$("[data-type='off']").click(function(){

			var id = $(this).attr('data-id');
			var state = $(this).attr('data-state');
			//alert(id);
			if (id) {
				$.ajax({
					url:"{:U('Trade/order_off')}",
					data:{id:id,state:state,type:'order_off'},
					type:'post',
					dataType:'json',
					success:function (e) {			
					//alert(id);
						alert(e.info); 
						location.reload();				
					}
				});	
			} 

		});
    })


</script>
</block>	









